package com.uzhie.jt808.msg.entity.JT_200;


import com.uzhie.jt808.msg.entity.BitConverter;
import com.uzhie.jt808.msg.entity.IPositionAdditionalItem;

/**
 * GPS信号强弱
 */
public class PostitionAdditional_GpsIntensity implements IPositionAdditionalItem
{
	public final int getAdditionalId()
	{
		return 0x31;
	}

	public final byte getAdditionalLength()
	{
		return 0x01;
	}

	/** 
	 GPS信号强弱
	 
	*/

//ORIGINAL LINE: private ushort recorderSpeed;
	private int intensity;

	public int getIntensity() {
		return intensity;
	}

	public void setIntensity(int intensity) {
		this.intensity = intensity;
	}

	public final byte[] WriteToBytes()
	{
		if (BitConverter.IsLittleEndian)
		{
			byte[] bytes = new byte[1];
			bytes[0] = (byte)(getIntensity());
			return bytes;
		}
		else
		{
			return BitConverter.GetBytes(getIntensity());
		}
	}

	public final void ReadFromBytes(byte[] bytes)
	{
			setIntensity((int)(bytes[0]));
	}
}